package hash;

/**
 * @author way
 * @create 2025-02-07 10:23
 */
public class _242_isAnagram {
    public boolean isAnagram(String s, String t) {
        int[] arr = new int[26];

        for (int i = 0; i < s.length(); i++) {
            arr[s.charAt(i)-'a']++;
        }

        for (int i = 0; i < t.length(); i++) {
            arr[t.charAt(i)-'a']++;
        }

        for (int count : arr) {
            if (count!=0) {
                return false;
            }
        }
        return true;
    }
}
